#include "action.h"
#include "character.h"
#include "state.h"

void CActionBase::Init(UINT lifetime, ICharacter* owner)
{
	owner->_elapseTime.Reset();
	owner->_lifetime = lifetime;
}

void CStdAction::Enter(ICharacter* owner)
{
	owner->playAction(ACTION::STD);
}

CStdAction* CStdAction::GetInstance()
{
	static CStdAction action;
	return &action;
}

void CWlkAction::Enter(ICharacter* owner)
{
	owner->playAction(ACTION::WLK);
}

CWlkAction* CWlkAction::GetInstance()
{
	static CWlkAction action;
	return &action;
}

void CAttAction::Enter(ICharacter* owner)
{
	owner->playAction(ACTION::ATT);
}

CAttAction* CAttAction::GetInstance()
{
	static CAttAction action;
	return &action;
}

void CAttAction::Exit(ICharacter* owner)
{
//	owner->_fsmManager.ChangeGlobalState(CFindTargetState::GetInstance());
}